package scenic.toolkit;


import scenic.ScenicCanvas;

public class RootPane extends ScenicCanvas {
	private ComponentView content;

	public RootPane() {
		addMouseListener(new RootMouseHandler(this));
		addMouseMotionListener(new RootMouseHandler(this));
		addMouseWheelListener(new RootMouseHandler(this));
	}
	
	public ComponentView getContent() {
		return content;
	}

	public void setContent(ComponentView content) {
		this.content = content;
		content.setRootPane(this);
		setScene(content.getScene());
	}	
	
	public void updateScene() {
		System.out.println("updateScene");
		if(content != null)
			content.validate();		
	}
}
